<script setup lang='ts'>
import { DropdownOption } from 'tdesign-vue-next';

interface EmitsProps {
    (e: 'click', value: DropdownOption): void
}

const props = defineProps<{
    options: DropdownOption[]
}>();

defineOptions({
    name: 'DropdownButton',
    globalComponent: true
});

const emits = defineEmits<EmitsProps>();

function clickHandler(dropdownItem: DropdownOption) {
    emits('click', dropdownItem)
}

</script>

<template>
    <t-dropdown :options="props.options" trigger="click" @click="clickHandler">
        <t-link style="margin-left: 8px;" theme="primary" hover="color">
                更多
            </t-link>
    </t-dropdown></template>

<style lang='scss'></style>